// src/main.js
import { createApp } from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify'
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from './components/HomeView.vue' // 重用现有 HellView.vue
import MusicView from './components/MusicView.vue'
import TemplateView from './components/TemplateView.vue'
import MusicPackageView from './components/MusicPackageView.vue'
import VoiceView from './components/VoiceView.vue'

import axios from 'axios'



// 配置路由
const routes = [
  { path: '/', name: 'home', component: HomeView },
  { path: '/music', name: 'music', component: MusicView },
  { path: '/package', name: 'package', component: MusicPackageView },
  { path: '/template', name: 'template', component: TemplateView },
  { path: '/voice', name: 'voice', component: VoiceView },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

const app = createApp(App)
app.config.globalProperties.$axios = axios // 正确的全局挂载方式
app.use(vuetify)
app.use(router)
app.mount('#app')